package Circle;

public class Circle {
    private double radius;
    public static final double PI = 3.14159265358979323846;
    public void setRadius(double r) {
        this.radius = r;
    }
    public double getRadius() {
        return this.radius;
    }
    public double getSpace() {
        return PI * this.radius * this.radius;
    }
    public double getCircumference() {
        return 2 * this.radius * PI;
    }

    public static void main(String[] args) {
        Circle cir1 = new Circle();
        cir1.setRadius(3);
        System.out.println("圆的半径为" + cir1.getRadius() + ",周长为" + cir1.getCircumference() + ",面积为" + cir1.getSpace());
    }
}